<!--
 * @Author: MSN
 * @Date: 2023-05-18 21:20:58
 * @LastEditTime: 2023-05-22 22:00:04
 * @LastEditors: MSN
 * @Description:
 * @FilePath: \vue3-ts-cms\src\App.vue
-->
<template>
  <div class="app">
    <ElConfigProvider :locale="locale">
      <router-view></router-view>
    </ElConfigProvider>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import { ElLoading, ElConfigProvider } from 'element-plus'
import store from '@/store'

import zhCn from 'element-plus/es/locale/lang/zh-cn'

export default defineComponent({
  name: 'App',
  components: {
    ElConfigProvider
  },
  setup() {
    const StoreName = store.state.name
    const openFullScreen2 = () => {
      const loading = ElLoading.service({
        lock: true,
        text: 'Loading',
        background: 'rgba(0, 0, 0, 0.7)'
      })
      setTimeout(() => {
        loading.close()
      }, 2000)
    }
    return {
      StoreName,
      openFullScreen2,
      locale: zhCn
    }
  }
})
</script>

<style lang="less">
.app {
  height: 100%;
}
</style>
